package com.uyaer.card.vo.soilder
{
	import com.uyaer.engine.utils.HashMap;

	public class SoilderDataManager
	{
		private static var m_instance:SoilderDataManager = new SoilderDataManager();
		
		private var _soilderSampleMap:HashMap = new HashMap();
		private var _soilderBagMap:HashMap = new HashMap();
		private var _soilderRankInfoMap:HashMap = new HashMap();
		private var _skillMap:HashMap = new HashMap();
		
		public function SoilderDataManager()
		{
		}
		public static function get i():SoilderDataManager{
			return m_instance;
		}

		/**
		 *所有的英雄模版数据
		 */
		public function get soilderSampleMap():HashMap{
			return _soilderSampleMap;
		}

		/**
		 *背包中的已经获得的士兵(该数据为已经强化升级后士兵数据) 
		 */
		public function get soilderBagMap():HashMap{
			return _soilderBagMap;
		}

		/**
		 * 士兵名称数据，内嵌Hashmap 最终是一个vo |"name":"剑士","desc":"不需要任何天赋就能成就的职业"|
		 */
		public function get soilderRankInfoMap():HashMap{
			return _soilderRankInfoMap;
		}

		/**
		 *通过兵种id和等级获得士兵的进阶信息 
		 * @param type
		 * @param lv
		 * @return 
		 * 
		 */		
		public function getSoilderRankInfo(type:String=SoilderSampleVo.TYPE_BLADE,lv:int=1):SoilderRankVo{
			return (_soilderRankInfoMap.get(type) as HashMap).get(lv);
		}

		/**
		 *技能信息 
		 */
		public function get skillMap():HashMap{
			return _skillMap;
		}

		/**
		 *根据技能id获得技能信息 
		 * @param skillId
		 * @return 
		 * 
		 */		
		public function getSkill(skillId:String):SkillVo{
			return _skillMap.get(skillId);
		}

	}
}